package cn.javasea.atomikos.user.ds1;

import cn.javasea.atomikos.user.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface UserInfoDs1Dao {
	@Select({
			"<script>",
			"SELECT ",
			" * ",
			"FROM user",
			"WHERE name = #{name,jdbcType=VARCHAR}",
			"</script>"})
	List<User> findByUserName(@Param("name") String name);

	@Insert({
			"<script>",
			" INSERT INTO `user` (`name`, `password`) VALUES (#{name,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR})",
			"</script>"
	})
	int insert(User userInfo);
}
